package com.youlai.boot.form.model.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.youlai.boot.common.base.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serial;
import java.time.LocalDateTime;

/**
 * 表单收集任务提交记录表
 *
 * @author fwj
 * @since 2025/11/7
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@TableName("form_collect_record")
public class FormCollectRecord extends BaseEntity {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 任务ID(form_collect_task.id)
     */
    private Long taskId;

    /**
     * 表单ID
     */
    private Long formId;

    /**
     * 填报人人ID
     */
    private Long targetId;

    /**
     * 填报人姓名
     */
    private String targetName;

    /**
     * 提交时间
     */
    private LocalDateTime submitTime;

    /**
     * 表单版本号
     */
    private Integer version;

    /**
     * 关联表单实例(form_instance.id)
     */
    private Long formInstanceId;

    /**
     * 状态：0草稿 1已提交 2退回
     */
    private Integer status;

    /**
     * 备注
     */
    private String remark;

    /**
     * 表单数据
     */
    private String formData;
}
